<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>字段设置</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
    />
    <link rel="stylesheet" href="../js/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="../style/admin.css" media="all"/>
    <link rel="stylesheet" href="../style/home.css" media="all"/>
    <script src="../js/layui/layui.js"></script>
    <style>
        .layui-form-item .layui-inline {
            padding-right: 0px;
            margin-right: 0px;
        }

        body {
            background-color: #fff;
            width: 100%;
            height: 100%;
            margin: 0px;
            padding: 0px;
            border: 0px;
        }

        .layui-form-item .layui-input-inline {
            width: 105px;
            padding-right: 0px;
            margin-right: 0px;
        }

        .layui-form-item {
            padding-right: 10px;
        }
    </style>
</head>
<body layadmin-themealias="default">
<div class="layui-row " style="height: 100vh; overflow-y: auto">
    <form class="layui-form" lay-filter="postData" action="" id="postData">
        <input type="hidden" name="id" value="put" th:value="${data.id}"/>
        <input type="hidden" name="classifyId" value="put" th:value="${data.classifyId}"/>
        <input type="hidden" name="fillingModel" value="put" th:value="${data.fillingModel}"/>

        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" id="fieldTitle" name="fieldTitle" required lay-verify="required"
                       placeholder="请输入标题" autocomplete="off" class="layui-input"
                       th:value="${data.fieldTitle}">
            </div>
        </div>
        <div class="layui-form-item" style="margin-top: 10px">
            <label class="layui-form-label">字段</label>
            <div class="layui-input-block">
                <select name="fieldName" id="fieldName" lay-filter="fieldName" lay-search="" required
                        lay-verify="required">
                    <option value="">直接选择或搜索选择</option>
                    <option th:selected="${option.name eq data.fieldName}"
                            th:each="option : ${fieldInfos}"
                            th:value="${option.name}" th:text="${option.title}"></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">数据类型</label>
            <div class="layui-input-block">
                <select name="dataType" id="dataType" lay-search="" lay-filter="dataType">
                    <option th:selected="'1'==${data.dataType}" value="1">字符</option>
                    <option th:selected="'2'==${data.dataType}" value="2">数字</option>
                    <option th:selected="'3'==${data.dataType}" value="3">整型</option>
                    <option th:selected="'4'==${data.dataType}" value="4">整型[4位]</option>
                    <option th:selected="'5'==${data.dataType}" value="5">日期[8位数字]</option>
                    <option th:selected="'6'==${data.dataType}" value="6">长字符</option>
                    <option th:selected="'7'==${data.dataType}" value="7">18位身份证</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">数据来源</label>
            <div class="layui-input-block">
                <select name="datasrcModel" id="datasrcModel" lay-search="" lay-filter="datasrcModel">
                    <option th:selected="'1'==${data.datasrcModel}" value="1">输入</option>
                    <option th:selected="'2'==${data.datasrcModel}" value="2">内置数据</option>
                    <option th:selected="'3'==${data.datasrcModel}" value="3">数据词典</option>
                    <option th:selected="'4'==${data.datasrcModel}" value="4">上级数据</option>
                    <option th:selected="'5'==${data.datasrcModel}" value="5">计算数据</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">对应来源</label>
            <div class="layui-input-block">
                <select name="datasrcCorresponding" required lay-search="" id="datasrcCorresponding">
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">入录组件</label>
            <div class="layui-input-block">
                <select name="editComponent" id="editComponent" lay-search="" lay-filter="editComponent">
                    <option th:selected="'1'==${data.editComponent}" value="1">单行录入</option>
                    <option th:selected="'2'==${data.editComponent}" value="2">数字</option>
                    <option th:selected="'3'==${data.editComponent}" value="3">日期</option>
                    <option th:selected="'4'==${data.editComponent}" value="4">选择</option>
                    <option th:selected="'5'==${data.editComponent}" value="5">2行录入</option>
                    <option th:selected="'6'==${data.editComponent}" value="6">4行录入</option>
                    <option th:selected="'6'==${data.editComponent}" value="7">8行录入</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">最大长度</label>
                <div class="layui-input-inline">
                    <input type="text" name="dataLen" id="dataLen" lay-filter="dataLen"
                           placeholder="请输入数据最大长度"
                           autocomplete="off" class="layui-input" th:value="${data.dataLen}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label"
                       style="width: 120px; padding-left: 25px">长度不足前面补充</label>
                <div class="layui-input-inline" style="width: 80px">
                    <input type="text" name="fillStr" id="fillStr" lay-filter="fillStr"
                           placeholder=""
                           autocomplete="off" class="layui-input" th:value="${data.fillStr}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">显示</label>
                <div class="layui-input-block" style="width: 150px">
                    <input type="checkbox" name="isShowlist" lay-skin="primary" value="1" title="列表"
                           th:checked="'1'==${data.isShowlist}">
                    <input type="checkbox" name="isShowedit" lay-skin="primary" value="1" title="编辑"
                           th:checked="'1'==${data.isShowedit}">
                    <input type="checkbox" name="isShowworkpro" lay-skin="primary" value="1" title="工作列表"
                           th:checked="'1'==${data.isShowworkpro}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 60px">显示宽度</label>
                <div class="layui-input-inline">
                    <input type="text" name="showWidth" id="showWidth" lay-filter="showWidth" autocomplete="off"
                           class="layui-input" th:value="${data.showWidth}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-block" style="width: 150px">
                    <input type="checkbox" name="isSort" id="isSort" lay-filter="isSort" value="1"
                           lay-skin="primary" title="排序" th:checked="'1'==${data.isSort}">
                    <input type="checkbox" name="ismixSort" id="ismixSort" lay-filter="ismixSort" value="1"
                           lay-skin="primary" title="混排" th:checked="'1'==${data.ismixSort}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 60px">排序顺序</label>
                <div class="layui-input-inline">
                    <input type="text" name="sortIdx" id="sortIdx" autocomplete="off" class="layui-input"
                           th:value="${data.sortIdx}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">内容</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="isOnly" lay-skin="primary" value="1" title="唯一"
                           th:checked="'1'==${data.isOnly}">
                    <input type="checkbox" name="isMakeonly" lay-skin="primary" value="1" title="组合唯一"
                           th:checked="'1'==${data.isMakeonly}">
                    <input type="checkbox" name="isMust" lay-skin="primary" value="1" title="必填"
                           th:checked="'1'==${data.isMust}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">检索</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="isSearch" lay-skin="primary" value="1" title="可检索"
                           th:checked="'1'==${data.isSearch}">
                    <input type="checkbox" name="isFastsearch" lay-skin="primary" value="1" title="快速检索"
                           th:checked="'1'==${data.isFastsearch}">
                    <input type="checkbox" name="isVaguesearch" lay-skin="primary" value="1" title="模糊检索"
                           th:checked="'1'==${data.isVaguesearch}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">输入</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="isKeep" lay-skin="primary" value="1" title="保持"
                           th:checked="'1'==${data.isKeep}">
                    <input type="checkbox" name="isAutoinc" lay-skin="primary" value="1" title="自动增长"
                           th:checked="'1'==${data.isAutoinc}">
                    <input type="checkbox" name="isSequencenumber" lay-skin="primary" value="1" title="顺序号"
                           th:checked="'1'==${data.isSequencenumber}">
                    <input type="checkbox" name="isBatchAdd" lay-skin="primary" value="1" title="批量增加"
                           th:checked="'1'==${data.isBatchAdd}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">EXIF</label>
                <div class="layui-input-block" style="width: 150px">
                    <input type="checkbox" name="readExif" id="readExif" lay-readExif="isSort" value="1"
                           lay-skin="primary" title="读Exif" th:checked="'1'==${data.readExif}">
                    <input type="checkbox" name="writeExif" id="writeExif" lay-filter="writeExif" value="1"
                           lay-skin="primary" title="写Exif" th:checked="'1'==${data.writeExif}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 60px">Exif命令</label>
                <div class="layui-input-inline">
                    <input type="text" name="exifField" id="exifField" autocomplete="off" class="layui-input"
                           th:value="${data.exifField}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">

            <div class="layui-inline">
                <label class="layui-form-label">其它</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="fixedLeft" lay-skin="primary" value="1" title="左边固定列"
                           th:checked="'1'==${data.fixedLeft}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 60px">默认值</label>
                <div class="layui-input-inline">
                    <input type="text" name="defValue" id="defValue" autocomplete="off" class="layui-input"
                           th:value="${data.defValue}">
                </div>
            </div>
        </div>
        <button type="submit" class="layui-btn" lay-submit="" lay-filter="postData" id="postBut"
                style="display: none">
            立即提交
        </button>
    </form>
</div>
<script>
    ID = '[[${data.id}]]'
    classifyId = '[[${data.classifyId}]]'
    fillingModel = '[[${data.fillingModel}]]'
    dataSrcCorr = '[[${data.datasrcCorresponding}]]'
</script>
<script src="../js/modules/basic/setMataData.js"></script>
<script type="text/javascript" src="../js/lib/watermark.js"></script>
</body>
</html>